home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Singles Flirt Up Your Life! (German)
/
Singles Flirt Up Your Life.iso
/
data1.cab
/
Statemachine
/
autoDestruct.lua
< prev
next >
Wrap
Text File
|
2004-01-29
|
561b
|
27 lines
-- pool state machine
beginStateMachine()
onEnter(function(msg)
print("autoDestruct onEnter: " .. getType());
local lifeTime = tonumber(readConfig("Game", "lifeTime" .. getType(), tostring(DEFAULT_LIFE_TIME)));
if (lifeTime) then
print(" >lifeTime: " .. lifeTime);
sendDelayedMsg("autoDestruct", this, lifeTime);
else
print(" >lifeTime undefined");
end
end )
onMsg("autoDestruct", function(msg)
print("autoDestruct time is up: " .. getType());
this.deleteGameObject();
end )
endStateMachine()